package cn.tedu.csmall.product.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
//在POJO类的声明上添加@Data注解
@Data
/*
@Getter
@Setter
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
//支持链接式连接调用
@Accessors(chain = true)
@Slf4j
*/
public class AlbumAndNewDTO implements Serializable{
    @ApiModelProperty(value = "相册名称",example = "小米80的相册",required = true)
    @NotNull(message="没有添加相册名称")
    private String name;

    @ApiModelProperty(value = "相册简介",example = "小米80的相册简介",required = true)
    @NotNull(message = "没有添加说明")
    private String description;

    @ApiModelProperty(value = "相册序列号",example = "80",required = true)
    @NotNull(message="没有添加序列号")
    @Range(max = 99,message = "自定义排序序号必须是0~99之间的值")
    private Integer sort;
}
